package com.czk.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/11/1 22:44
 */
@Data
public class User {
    // AUTO自动生成
    // ASSIGN_ID 雪花算法生成的id
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private String name;
    private Integer age;
    private String email;
    // 自动填充的字段
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    // 乐观锁
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;
    // 逻辑删除标记字段
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;
}
